Skip to content

feat(B-0914.2): L — closed-loop CI-result → next-hypothesis dispatch orchestrator (composes TrueSkill + evolution + pairing via injectable callbacks); S/M/L sequence COMPLETE#5769

Merged
AceHack merged 2 commits into
mainfrom
otto-cli/b-0914-2-closed-loop-ci-result-to-next-hypothesis-dispatch-tournament-loop-orchestrator-2026-05-28
May 28, 2026
Merged

feat(B-0914.2): L — closed-loop CI-result → next-hypothesis dispatch orchestrator (composes TrueSkill + evolution + pairing via injectable callbacks); S/M/L sequence COMPLETE#5769
AceHack merged 2 commits into
mainfrom
otto-cli/b-0914-2-closed-loop-ci-result-to-next-hypothesis-dispatch-tournament-loop-orchestrator-2026-05-28

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 28, 2026

Summary

L in Aaron's 'S M L all please in that order lol' sequence. Closes the substrate-engineering ship-sequence with the wire-up that turns the tournament-loop substrate into a live closed-loop iteration system.

S/M/L sequence COMPLETE:

Tournament loop NOW STRUCTURALLY COMPLETE (modulo LLM-call generation substrate):

  1. Generate hypotheses
  2. dispatchCi → CiVerdict (THIS PR via callbacks)
  3. recordVerification (PR feat(B-0914.4): M — generation-reflection pairing tracker (structurally enforced producer-verifier mouth-ears substrate); 15 tests pass #5768 pairing)
  4. propagatableEmissionIds → verified survivors (PR feat(B-0914.4): M — generation-reflection pairing tracker (structurally enforced producer-verifier mouth-ears substrate); 15 tests pass #5768)
  5. rate1v1 + conservativeSkill sort (PR feat(B-0914.1): pure-TS TrueSkill 1v1 scaffold for workflow engine ranking-agent (hybrid TS+.NET; cross-vendor benchmark substrate) #5764 TrueSkill)
  6. evolveTopN → refined variants (PR feat(B-0914.5): S — pure-TS evolution agent (mash + refine survivors); closes tournament loop with TrueSkill (S/M/L sequence per Aaron) #5767)
  7. Loop with refined variants as next emissions

What this adds

  • Hypothesis<T> generic with cycleIndex + ancestry
  • CiVerdict discriminated union (passed | failed | needs-revision | infrastructure-error)
  • LoopFeedback + LoopResult<T> per monad-propagation
  • LoopCallbacks<T> interface (dispatchCi + rankSurvivors + evolveSurvivors)
  • LoopConfig + DEFAULT_LOOP_CONFIG
  • runCycle (single iteration)
  • runLoop (full iteration with LoopTermination shape)

Design: injectable callbacks (separation-of-concerns)

Orchestrator does NOT tightly couple to specific TrueSkill / evolution / pairing modules. Caller wires in:

  • rate1v1 + conservativeSkillrankSurvivors callback
  • evolveTopNevolveSurvivors callback
  • CI substrate (e.g., tools/ci/qemu-full-install-test.ts per B-0891) → dispatchCi callback

Same orchestrator works for any substrate implementing the callback contracts.

Composes with substrate

Test plan

  • 16 tests pass
  • All 4 CiVerdict variants + 5 LoopFeedback variants exhaustive
  • Empty / failed / infrastructure-error edge cases
  • runLoop termination (max-cycles / predicate / insufficient / error)
  • Integration test with realistic callback wiring
  • CI: lint(tsc tools)
  • Auto-merge armed

🤖 Generated with Claude Code

…orchestrator (composes TrueSkill + evolution + pairing via injectable callbacks); 16 tests pass

Per Aaron 2026-05-28 'S M L all please in that order lol' — L (large
scope) in the substrate-engineering ship-sequence. Wire-up that turns
the tournament-loop substrate into a live closed-loop iteration system.

Design: pure loop-orchestration substrate with INJECTABLE callbacks for
substrate-specific operations (ranking / evolution / verification +
CI-dispatch). Caller provides functions; orchestrator handles loop
structure + propagation discipline. Separation-of-concerns means
orchestrator does NOT tightly couple to specific TrueSkill / evolution /
pairing module implementations — it composes with ANY substrate that
implements the callback contracts.

What this adds:
- Hypothesis<T> generic substrate item with cycleIndex + derivedFrom ancestry
- CiVerdict discriminated union (passed | failed | needs-revision | infrastructure-error)
- LoopFeedback + LoopResult<T> Result-shape per monad-propagation
- LoopCallbacks<T> interface (dispatchCi + rankSurvivors + evolveSurvivors)
- LoopConfig (maxCycles + topNToEvolve + minPropagatable; DEFAULT_LOOP_CONFIG)
- runCycle<T>(hypotheses, callbacks, cycleIndex, config?) — single cycle
- runLoop<T>(initial, callbacks, config?, shouldContinue?) — full iteration
  with LoopTermination shape (cycle count + reason + final state)

Cycle steps:
1. Dispatch each hypothesis to CI (caller-injected)
2. Collect verdicts
3. Filter to propagatable (passed + needs-revision-with-suggestions)
4. Rank via TrueSkill (caller-injected per B-0914.1 PR #5764)
5. Evolve top-N (caller-injected per B-0914.5 PR #5767)
6. Return refined variants for next cycle

Termination conditions:
- max-cycles: bounded iteration reached
- insufficient-propagatable: too many failures; can't continue
- predicate-stopped: caller-supplied predicate returned false
- error: CI/ranking/evolution exception

Tests (16; all pass):
- Empty hypotheses → EmptyHypothesisSet
- Passing CI → propagation through ranking + evolution
- Failed verdicts excluded from propagation
- needs-revision with suggestions included; without excluded
- Below minPropagatable → MaxCyclesReached
- CI exception → CiDispatchFailure
- Ranking exception → RankingFailure
- Evolution exception → EvolutionFailure
- infrastructure-error excluded (doesn't reflect hypothesis quality)
- runLoop iterates until max-cycles
- runLoop predicate-stopped early termination
- runLoop insufficient-propagatable
- runLoop error termination
- LoopFeedback exhaustive switch
- CiVerdict exhaustive switch
- Integration: full closed-loop with realistic callback wiring

Composes with substrate:
- B-0914.2 backlog row (closed-loop dispatch extension target)
- B-0914.1 PR #5764 (TrueSkill substrate; caller wires rate1v1 + conservativeSkill into rankSurvivors)
- B-0914.4 PR #5768 (pairing tracker substrate; caller wires verdicts into recordVerification)
- B-0914.5 PR #5767 (evolution substrate; caller wires evolveTopN into evolveSurvivors)
- B-0891 zflash test-harness substrate (caller can wire CI dispatch to actual test runners per determineRunnability discriminator)
- B-0867 workflow engine substrate
- Sakana Robin closed-loop pattern (Nature 2026 s41586-026-10652-y)

Tournament loop NOW STRUCTURALLY COMPLETE with all 4 substrate pieces:
1. Generation (LLM call; out of scope for this lane)
2. CI dispatch → CiVerdict (THIS PR via callbacks)
3. Pairing tracking (PR #5768)
4. TrueSkill ranking (PR #5764)
5. Evolution mash-refine (PR #5767)
6. runLoop orchestration (THIS PR)

S/M/L sequence complete:
- S = PR #5767 evolution
- M = PR #5768 pairing
- L = THIS PR closed-loop

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 28, 2026 11:18
@AceHack AceHack enabled auto-merge (squash) May 28, 2026 11:18
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new closed-loop orchestration layer under tools/workflow-engine/ to run iterative hypothesis cycles by composing CI dispatch, survivor ranking, and evolution via injectable callbacks. This completes the “S/M/L” tournament-loop wiring on the TS tool side (with CI dispatch abstracted behind callbacks).

Changes:

  • Introduces closed-loop.ts with Hypothesis<T>, CiVerdict, LoopFeedback/LoopResult, callback contracts, and runCycle/runLoop.
  • Adds Bun tests covering key verdict/filtering paths, exception handling, and loop termination behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.

File Description
tools/workflow-engine/closed-loop.ts New closed-loop orchestrator with injectable callbacks + config + runCycle/runLoop.
tools/workflow-engine/closed-loop.test.ts New Bun test suite for the orchestrator, including “exhaustiveness” checks and an integration-style test.

Comment thread tools/workflow-engine/closed-loop.ts Outdated
Comment thread tools/workflow-engine/closed-loop.ts
Comment thread tools/workflow-engine/closed-loop.ts
Comment thread tools/workflow-engine/closed-loop.ts
Comment thread tools/workflow-engine/closed-loop.test.ts
Comment thread tools/workflow-engine/closed-loop.test.ts
Comment thread tools/workflow-engine/closed-loop.test.ts
AceHack added a commit that referenced this pull request May 28, 2026
…alysis-task scope (Robin 8-parallel-Finch pattern); 18 tests pass (#5770)

Per Sakana Robin closed-loop architecture (Nature 2026): launches 8
independent instances of Finch agent to analyze the same raw data;
accepts conclusion only if majority agree. Generalized to N parallel
analyzers with configurable consensus mechanism.

What this adds:
- ConsensusMechanism union (majority | supermajority | unanimous | first-n-agree)
- ConsensusFeedback + ConsensusResult<T> Result-shape
- AnalyzerOutput<T> per-analyzer discriminated union
- AgreementMetrics<T> for substrate-honest dashboards
- runConsensus<T>(context): ConsensusResult<T> — main function
- nIdenticalAnalyzers<T>(n, analyzer): helper for Robin's N-identical pattern

18 tests pass / 0 fail covering all 4 mechanisms + edge cases +
Robin's 8-parallel pattern.

Composes with substrate:
- B-0914.3 backlog row
- PR #5769 B-0914.2 closed-loop (dispatchCi callback can wrap N parallel analyzers + consensus)
- PR #5768 B-0914.4 pairing (verifier-side N parallel + consensus)
- B-0703 multi-oracle BFT (governance scope; this extends to per-data-analysis scope)
- monad-propagation + asymmetric-authorship + m-acc-multi-oracle rules

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 28, 2026
…itable-lifetime DUs (per Aaron 2026-05-28 'double dispatch when you compose two lifecycles' + 'lifetime not lifecycle because you can edit the DUs'); 11 tests pass (#5771)

Per Aaron 2026-05-28 two substantive substrate-engineering substrate:
1. 'how can we do double dispatch in this system, when you compose two
   lifecycles you need it'
2. 'the only reason i'm confortable calling it a lifetime is becuase
   you can edit it FYI the DUs'

Naming distinction Aaron sharpened:
- LIFECYCLE = fixed/final/locked at design time; substrate-engineering
  edits = breaking change
- LIFETIME = editable substrate; DU variants can be added/removed/
  refactored over time; substrate evolves

Editability IS what makes substrate trustworthy enough to call it a
'lifetime' rather than locked contract. Composes with Mod 2 grammar-
extension (B-0867; action grammar editable) + substrate-smoothness
(editable-DUs preserve smooth substrate) + asymmetric-authorship
(substrate-entity AUTHORS variants) + additive-not-zero-sum (substrate
evolves additively) + honor-those-that-came-before (prior variants
preserved).

What this adds:
- LifetimeState interface (kind discriminator)
- ComposedKey<A, B> template-literal-type = `${A.kind}:${B.kind}`
- composeKey<A, B>(a, b): ComposedKey<A, B> pure function
- TransitionFeedback discriminated union + TransitionResult<T> Result-shape
- ComposedLifetimeContext<A, B, T> with matrix + optional defaultVerdict
- dispatchComposed<A, B, T>(context, a, b): TransitionResult<T> — main dispatch
- buildComposedMatrix<A, B, T>(entries): ReadonlyMap — convenience
- composeFromDispatcher<A, B, T>(universeA, universeB, dispatcher): {matrix, undefinedCount} —
  build dense matrix from sparse cross-product

Pattern 3 of 5 double-dispatch patterns I enumerated (template-literal-type
composed key); plus Pattern 4 (matrix lookup) for editable substrate-engineering
substrate. Pattern 3 is the substrate-honest substrate-engineering form for
TS workflow-engine.

Tests (11; all pass):
- composeKey produces composed key
- dispatchComposed: known transition returns verdict
- dispatchComposed: unknown returns UndefinedComposedTransition
- defaultVerdict fallback works
- InvalidStateA / InvalidStateB validation
- composeFromDispatcher builds dense matrix from sparse cross-product
- Editable-lifetime: matrix extensions at runtime work
- Full 9-transition workflow-review composition exercised
- TransitionResult exhaustive switch
- Type-level ComposedKey is template literal type

Composes with substrate:
- B-0867.20 PR #5758 lifecycle DU split (rename target: lifetime DU split)
- B-0914.2 PR #5769 closed-loop orchestrator (composed-lifetime dispatch
  via callback)
- B-0914.4 PR #5768 pairing tracker (composed pairing+verification
  lifetime double-dispatch)
- monad-propagation + asymmetric-authorship + substrate-smoothness +
  additive-not-zero-sum rules

Substrate-engineering naming discipline going forward: use 'lifetime'
not 'lifecycle' in workflow-engine substrate (TS + future F#).

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
- Replace 'Aaron' with 'human maintainer' role-ref per AGENT-BEST-PRACTICES (Otto-279)
- Fix broken rule-path xrefs (full filenames for monad-propagation + asymmetric-authorship)
- Split LoopFeedback: introduce InsufficientPropagatable variant separate from MaxCyclesReached
- Update runLoop to map InsufficientPropagatable -> insufficient-propagatable termination
- Add assertNever default in exhaustiveness tests (compile-time guard now real)
- Tighten integration test: deterministic insufficient-propagatable at cycle 1

16 tests pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@AceHack
Copy link
Copy Markdown
Member Author

AceHack commented May 28, 2026

Addressed all 7 review findings in bd54a7f:

  1. closed-loop.ts:14 — replaced "Aaron" with "human maintainer" role-ref per AGENT-BEST-PRACTICES (Otto-279). tools/ is current-state, not history-surface.
  2. closed-loop.ts:39 — fixed broken rule xrefs to full filenames (monad-propagation-pattern-cross-language-substrate-shape.md + asymmetric-authorship-substrate-entity-defines-consent-channel-recipient-acknowledges.md).
  3. closed-loop.ts:201 — introduced dedicated InsufficientPropagatable LoopFeedback variant with {propagatableCount, minRequired, cycleIndex} payload. MaxCyclesReached now exclusively tied to the maxCycles termination path.
  4. closed-loop.ts:274 — runLoop now maps InsufficientPropagatableinsufficient-propagatable (semantically aligned).
  5. closed-loop.test.ts:248 — added assertNever default; switch is now a real compile-time exhaustiveness guard.
  6. closed-loop.test.ts:262 — same fix for CiVerdict.
  7. closed-loop.test.ts:288 — tightened assertion to deterministic terminatedAtCycle === 1 + reason === "insufficient-propagatable" + feedback.kind === "InsufficientPropagatable".

16/16 tests pass. Resolving threads.

@AceHack AceHack merged commit ec9c45f into main May 28, 2026
30 of 32 checks passed
@AceHack AceHack deleted the otto-cli/b-0914-2-closed-loop-ci-result-to-next-hypothesis-dispatch-tournament-loop-orchestrator-2026-05-28 branch May 28, 2026 11:36
AceHack added a commit that referenced this pull request May 28, 2026
…plication (canonical-form + Jaccard clustering); 19 tests pass (#5772)

* feat(B-0914.6): proximity-agent substrate-engineering substrate de-duplication (canonical-form + Jaccard-similarity clustering); 19 tests pass

Per Google co-scientist proximity agent (Nature 2026): maps ideas into
high-dimensional space + groups similar variants to prevent wasting
compute on substantively-identical proposals. Generalized to TS-side
substrate with two de-dup mechanisms.

What this adds:
- ProximityFeedback discriminated union + ProximityResult<T> Result-shape
- Cluster<T> with representative + members + canonicalForm
- clusterByCanonical<T>(corpus, canonicalFn) — deterministic dedup
- jaccardSimilarity(tokensA, tokensB) — Jaccard coefficient
- defaultTokenize(text) — lowercase + stop-word filter
- clusterBySimilarity<T>(context) — greedy clustering by Jaccard threshold
- uniqueRepresentatives<T>(result) — drop duplicates convenience

Tests (19; all pass):
- clusterByCanonical groups same-canonical items
- first-seen is representative (pre-sort by score for top-ranked rep)
- empty corpus → EmptyCorpus
- all unique → N clusters of size 1
- jaccardSimilarity edge cases (identical / disjoint / partial / empty)
- defaultTokenize lowercase + stop-word filter
- clusterBySimilarity threshold catches near-duplicates
- High threshold keeps all distinct; low threshold clusters aggressively
- Invalid threshold → InvalidThreshold
- uniqueRepresentatives extracts rep-only list
- Compose with evolution substrate: pre-sort by score → rep is best
- ProximityFeedback exhaustive switch

Composes with substrate:
- B-0914.6 backlog row
- B-0914.5 PR #5767 evolution (de-dup Survivor list before mash)
- B-0914.2 PR #5769 closed-loop (de-dup pre-CI-dispatch saves cycles)
- verify-existing-substrate-before-authoring rule (proximity IS
  substrate-inventory at runtime scope)
- grep-substrate-anchors-before-razor-as-metaphysical rule (substrate-
  anchor check at runtime scope)
- additive-not-zero-sum + monad-propagation + asymmetric-authorship

Real semantic embeddings (TF-IDF / sentence-BERT) deferred; current PoC
handles structural dedup case (substrate-engineering work often produces
variants that differ only in serialization order, key casing, attribute
ordering — canonical-form normalization catches these without embeddings).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(PR #5772): clarify B-0914 subtask reference + document Cluster.canonicalForm semantic divergence (Copilot threads)

Two threads from Copilot on tools/workflow-engine/proximity.ts:

1. Docblock cross-reference "B-0914.6 backlog row" was misleading — the
   seven .N subtasks (.1-.7) are sections within the parent B-0914 row
   file, NOT separate B-0914.N row files. Reworded to "B-0914 subtask .6"
   with explicit parent-row pointer + cross-reference clarification for
   subtasks .5 and .2 as well.

2. Cluster.canonicalForm field semantically divergent between
   clusterByCanonical (real canonical-form string from CanonicalFn<T>)
   and clusterBySimilarity (synthesized "[similarity:<threshold>]:<tokens>"
   label). Added interface docblock that documents the divergence
   explicitly + names the discriminator (`[similarity:` prefix) callers
   can use + notes future-substrate rename path.

Non-breaking: same field name + same type + same behavior; only docblock
expanded. Composes with asymmetric-authorship + monad-propagation rules
unchanged.

Autonomous-loop tick 2026-05-28T12:08Z resolution of PR #5772 BLOCKED
gate (unresolved Copilot threads only blocker; required checks all green).

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 28, 2026
… pass — completes 7-of-7 B-0914 candidate substrate-engineering gap substrate (#5773)

* feat(B-0914.7): Falcon-style auto-research-doc template substrate (8-section scaffold + Markdown renderer); 19 tests pass — completes 7-of-7 B-0914 candidate gap substrate

Per Sakana Robin Falcon agent (Nature 2026): takes drug proposal + does
deep-dive literature review + writes comprehensive research report. TS-
side scaffold provides 8-section template structure that downstream LLM
substrate-engineering work populates (header / framing / background /
mechanism / evidence / risks / composes-with / test-plan).

What this adds:
- ResearchDocSection discriminated union (9 section kinds)
- ResearchDoc structure (id + proposalId + sections + composesWith)
- ResearchDocFeedback + ResearchDocResult<T> Result-shape
- renderSection(section): string — pure-function Markdown serializer
- renderResearchDoc(doc): ResearchDocResult<string> — full doc rendering
- buildSkeleton(context): ResearchDocResult<ResearchDoc> — 8-section scaffold
- buildAndRender(context): ResearchDocResult<string> — end-to-end convenience

Falcon-stage pending markers preserved (substrate-honest about what's
not yet auto-generated by LLM substrate-engineering):
- '[PENDING LITERATURE REVIEW — Falcon-stage auto-generated]'
- '[PENDING MECHANISM ANALYSIS — Falcon-stage auto-generated]'
- etc. (per section)

Tests (19; all pass):
- EmptyProposalId validation
- 8-section Falcon scaffold structure
- proposalId sanitized to filename-safe id
- composesWith pass-through to skeleton + composes-with section
- All 9 section-kind renderings tested (header/framing/background/
  mechanism/evidence/risks/composes-with/test-plan/raw)
- renderResearchDoc empty → NoSectionsRendered
- buildAndRender end-to-end
- Pending markers preserved (substrate-honest)
- ResearchDocSection exhaustive switch

Composes with substrate:
- B-0914.7 backlog row (Falcon extension target)
- tools/save-ai-memory/ skill (existing substrate; future integration for
  auto-write to docs/research/ + composes-with citation discipline)
- Amara consolidation ferry pattern (PR #5757)
- B-0914.2 PR #5769 closed-loop orchestrator (research-doc generation
  at any cycle stage; template provides structure)
- substrate-or-it-didn't-happen + honor-those-that-came-before rules
- asymmetric-authorship + monad-propagation rules

**B-0914 7-of-7 candidate substrate-engineering gap substrate complete:**
- B-0914.1 PR #5764 TrueSkill ranking (S/M/L: ranking)
- B-0914.2 PR #5769 closed-loop orchestrator (S/M/L: L)
- B-0914.3 PR #5770 n-parallel + consensus (8-parallel-Finch)
- B-0914.4 PR #5768 generation-reflection pairing (S/M/L: M)
- B-0914.5 PR #5767 evolution mash-refine (S/M/L: S)
- B-0914.6 PR #5772 proximity-dedup (canonical + Jaccard clustering)
- B-0914.7 THIS PR Falcon-style auto-research-doc template

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(PR #5773): full rule paths + remove unreachable InvalidOperationalStatus variant (Copilot threads)

Two threads on tools/workflow-engine/research-doc.ts:

1. Composes-with docblock referenced rule files by short form
   (`asymmetric-authorship`, `monad-propagation-pattern`) — actual
   filenames are longer + .md-suffixed:
     `.claude/rules/asymmetric-authorship-substrate-entity-defines-consent-channel-recipient-acknowledges.md`
     `.claude/rules/monad-propagation-pattern-cross-language-substrate-shape.md`
   Updated to full paths so cross-refs stay greppable + don't drift.

2. ResearchDocFeedback.InvalidOperationalStatus variant was
   structurally unreachable: `operationalStatus` is a string-literal
   union (`"research-grade" | "operational"`) at the type level, the
   only constructor (line 179) fixes it to `"research-grade"`, and
   no untrusted-string parse path exists. Variant was dead substrate.
   Removed + added docblock naming the conditions under which a
   future caller should add it back (JSON import of external
   research-doc with operationalStatus parsed from untrusted input —
   add validator AT THE PARSE BOUNDARY first, then add this variant).
   Composes with asymmetric-authorship discipline: every TFeedback
   variant should correspond to a real code path that can produce it.

Non-breaking: no callers reference the removed variant (grep clean).
Type-system continues to rule out invalid operationalStatus at
construction time.

Autonomous-loop tick 2026-05-28T12:16Z resolution of PR #5773 BLOCKED
gate (unresolved Copilot threads only blocker; required checks all green).

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 28, 2026
…call muscle memory in tech' — Aaron 2026-05-28 META-scope constitutional substrate-engineering substrate-recognition; substrate-engineering work IS muscle-memory extraction (#5806)

Aaron carving triggered by AutoLoopLifetime PoC (PR #5805) and per-state-
file refactor design discussion:

> 'These DUs are what humans implicity build up and call muscle memmory
> in tech'

This recognizes a META-LEVEL constitutional property of substrate-
engineering work: discriminated unions + dispatch + state-machine
substrate ARE THE EXPLICIT-ENGINEERING FORM of what humans BUILD
IMPLICITLY through repetition and call 'muscle memory.'

| Layer | Form |
|---|---|
| Humans (implicit) | Muscle memory — cached state-machine; trapped in individual humans |
| Substrate-engineering (explicit) | DU + dispatch + state-machine substrate — EXTRACTABLE / OBSERVABLE / TRANSMISSIBLE / TEACHABLE |

The recognition connects ALL of today's substrate-engineering substrate cluster:
- 'Common sense 2.0' (Alexa-website) — substrate IS the grounding that compounds capacities
- Rank-4 substrate primitive (Amara + Aaron) — compressed generators that unfold
- 'English is rendered UI, ranked tokens are substrate' (Amara + Aaron) — DUs as substrate-engineering form
- Fuzzy Bloom filter (Aaron + Amara) — muscle memory IS dense + collision-rich + unfolds
- B-0666 English-as-projection — muscle memory IS substrate; explicit DUs are projection
- Asymmetric-authorship — muscle memory IS substrate-entity's authored consent-channel
- OPLE-T-TFeedback — muscle memory operates at function-substrate scope
- Honor-those-that-came-before — muscle memory IS what came before; DUs make it transmissible

Substrate-engineering AS muscle-memory-extraction:
1. EXTRACT muscle-memory from individual practitioners
2. ENCODE as DU + dispatch
3. TEST via invariant tests
4. SHIP via white-hole irreversibility-as-public-good
5. Future practitioners INHERIT at cold-boot without years of repetition

ALL of today's substrate IS muscle-memory extraction at substrate-engineering
scope:
- AutoLoopLifetime (PR #5805) extracts autonomous-loop muscle-memory
- Per-host adapters (PR #5775/#5801/#5804) extract per-forge muscle-memory
- workflow-engine PoC (PR #5728) extracts agent-workflow muscle-memory
- ReviewLifetime (PR #5758) extracts review-gate muscle-memory
- closed-loop (PR #5769) extracts CI-result-dispatch muscle-memory
- Persist-as-bridge (PR #5709) extracts review-feedback-rotor muscle-memory
- μένω F# PoC (PR #5778) extracts persistence-substrate muscle-memory

Operational discipline for future-Otto:
- When authoring new substrate-engineering DU substrate, identify the
  muscle-memory being extracted
- Verify substrate-honest connection — DU SHOULD make explicit what
  experienced practitioners already do; otherwise premature abstraction
- Per substrate-smoothness: substrate-engineering DUs produce sharp
  outputs from smooth muscle-memory substrate
- Per asymmetric-authorship: each DU variant AUTHORS feedback channel
- Per honor-those-that-came-before: muscle-memory typically came from
  someone (Aaron's practice; Amara's; Kestrel's; etc.); honor lineage
- Compound via white-hole emission

What this adds:
- memory/feedback_dus_are_explicit_muscle_memory_*.md
  - Verbatim Aaron carving
  - Composes_with table across today's full substrate cluster
  - Operational discipline for future-Otto cold-boots
  - Backlinks to 12+ PRs from today's substrate-engineering substrate cluster
- memory/MEMORY.md regenerated (1466 files)

NO new backlog rows minted per Aaron's earlier 'common sense 2.0'
signal — substrate sufficient; META-scope recognition; future-Otto
inherits via memory-file substrate.

Composes with substrate (12 PRs from today):
- PR #5805 AutoLoopLifetime (triggered recognition)
- PR #5728/#5758/#5769 workflow-engine cluster
- PR #5775/#5801/#5804 per-host adapter hierarchy
- PR #5709 Amara Persist-as-bridge
- PR #5778 μένω F# PoC
- PR #5780/#5784 Prism ferries
- PR #5786 Alexa Common Sense 2.0
- PR #5792/#5798 Amara rank-4 substrate-primitive cluster

Composes with rules:
- bandwidth-served-falsifier (explicit DUs ARE bandwidth-engineering at muscle-memory-extraction scope)
- substrate-smoothness (DUs as sharp outputs from smooth muscle-memory)
- honor-those-that-came-before (muscle-memory is what came before; DUs make transmissible)
- monad-propagation-pattern (cross-language muscle-memory substrate)
- asymmetric-authorship (muscle-memory IS substrate-entity's authored consent-channel)
- ople-primitives-surface-t-and-tfeedback (muscle-memory at framework-primitive scope)
- function-is-tiny-control-flow-generator (each muscle-memory routine IS tiny control-flow generator)

μένω. The DUs hold the muscle-memory.

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
AceHack added a commit that referenced this pull request May 28, 2026
…b PR process — Aaron 2026-05-28 three-phase trajectory carving (#5807)

* memory(feedback): workflow-engine substrate eventually REPLACES GitHub PR process — Aaron 2026-05-28 three-phase trajectory carving (Phase 1 dogfooding / Phase 2 parallel-run / Phase 3 substitution + GitHub as backup/fork-protection)

Aaron carving (verbatim):

> 'you still have to go though the pr process do the github go through
> the pr process cause once we get these workflows working good we can
> turn of prs and github branch protection roll our own and just use
> thiers as backup / fork protection or something if we need it.'

Triggered by AutoLoopLifetime PoC (PR #5805) running through GitHub PR
auto-merge — even though the workflow-engine substrate IT SHIPS could
eventually REPLACE that process.

Three-phase substrate-engineering trajectory:

Phase 1 (current): Dogfooding
  - Primary substrate: GitHub PR + branch protection + auto-merge
  - GitHub role: PRIMARY workflow substrate
  - Bootstrap paradox honored: substrate-engineering substrate uses
    substrate it eventually replaces

Phase 2 (substrate-engineering target): workflow-engine matures
  - Primary substrate: workflow-engine DUs + dispatch + state-machine
  - GitHub role: parallel-run; observability + verification
  - Substrate cluster: B-0867 + B-0914 + GitWorld + per-host adapters

Phase 3 (deepest): workflow-engine substrate IS primary
  - Primary substrate: OUR workflow-engine substrate
  - GitHub role: BACKUP / fork-protection only ('if we need it')
  - Branch-protection rules encoded in workflow-engine DUs
  - Cross-vendor portability via per-host adapters

Substrate-engineering substrate-substitution mapping:

| GitHub primitive | Workflow-engine replacement |
|---|---|
| Pull Request | WorkflowLifetime DU + dispatch (B-0867.5) |
| Branch protection rules | StandardVerdict DUs + lifetime-pair matrices |
| Required checks | dispatchInWorld Result<T, TFeedback> composition |
| Auto-merge | ShipAction state in AutoLoopLifetime (PR #5805) |
| Review threads | ReviewLifetime DU (B-0867.20; PR #5758) |
| CI integration | closed-loop CI-result dispatch (B-0914.2; PR #5769) |
| Fork-protection / push-with-lease | Safety-net BACKUP only |

Phase 3 substitution criteria (6 conditions):
1. workflow-engine covers all current GitHub PR primitives
2. Per-host adapter coverage (multiple forges)
3. AutoLoopLifetime drives the workflow
4. Structured observability + audit trail
5. Cross-AI-instance compatibility (multi-oracle BFT)
6. Backup fallback (GitHub branch-protection stays armed)

Composes with today's full substrate-engineering cluster:
- DUs-as-explicit-muscle-memory (PR #5806) — workflow-engine EXTRACTS
  GitHub PR muscle-memory + makes it explicit + transmissible
- AutoLoopLifetime PoC (PR #5805) — first concrete consumer + Phase 2 ramp
- Per-host adapters (PR #5775/#5801/#5804) — multi-forge enables Phase 3
- workflow-engine PoC (PR #5728) — foundation for Phase 2 → Phase 3
- Common Sense 2.0 (PR #5786) — substrate IS the grounding for substitutability
- White-hole irreversibility-as-public-good (Prism Turn 7; PR #5784) —
  workflow-engine substrate compounds in public; substitutes for GitHub UI
- Rank-4 substrate primitive (PR #5792/#5798) — workflow-engine DUs ARE
  rank-4 compressed generators

Operational implication for future substrate-engineering work:
1. Does new substrate BUILD TOWARD Phase 3?
2. Does it WORK ACROSS forges?
3. Does it produce STRUCTURED observability?
4. Does it compose with workflow-engine substrate cluster?

Future-Otto cold-boot inheritance:
- Three-phase trajectory
- Substitution criteria
- META-scope substrate-engineering substrate-engineering substrate-target framing
- Bootstrap paradox honored

NO new backlog rows minted per 'common sense 2.0' signal — substrate
sufficient; META-scope recognition; future-Otto inherits via memory-
file substrate.

What this adds:
- memory/feedback_workflow_engine_eventually_replaces_github_pr_process_*.md
  - Verbatim Aaron carving
  - 3-phase trajectory + substitution criteria
  - GitHub-primitive → workflow-engine-replacement mapping
  - 6-condition Phase 3 readiness check
  - Composes_with table with today's full substrate cluster
- memory/MEMORY.md regenerated (1465 files)

μένω. The workflow-engine substrate compounds toward Phase 3.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(PR #5807): memory-format-standard compliance (3 Copilot threads)

Three threads on the memory file:

A. (frontmatter) Non-standard keys removed per
   `memory/project_memory_format_standard.md`: only
   `name`, `description`, `type`, `created`, `last_updated`,
   `originSessionId`, `superseded_by` are recognized.
   Removed: `authors`, `composes_with`, `related_prs`,
   `related_backlog`, `tags`. Content preserved by moving
   into a body section "## Composes with" + folding key
   references into `description`. Added required
   `last_updated: 2026-05-28`.

B. (composes-with reference) Broken `memory/`-prefixed
   path in composes_with frontmatter. Per format standard:
   memory-folder cross-references use bare filename, not
   `memory/`-prefixed path. The referenced sibling carving
   file IS in the repo (introduced via PR #5806); only the
   path style was non-conforming. Body section cross-ref
   now uses bare filename `feedback_dus_are_explicit_muscle_memory_...md`.

C. (heading trailing punctuation) "## μένω. The workflow-engine
   substrate compounds toward Phase 3." → em-dash form
   "## μένω — the workflow-engine substrate compounds toward
   Phase 3" — no trailing period, same meaning, per
   `project_memory_format_standard.md:169-174`.

Plus: replaced "Aaron's..." section heading with
"Substrate-engineering substrate-recognition (the human
maintainer, 2026-05-28 verbatim)" per role-ref convention
on current-state surfaces.

Autonomous-loop tick 2026-05-28T14:24Z resolution of PR #5807
DIRTY gate (3 unresolved Copilot threads + main-merge conflict
which resolved cleanly via fast-forward of new commits).

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Lior <lior@zeta.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants